import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import redis.clients.jedis.Jedis;

public class jedis_test {

    private Jedis jedis;

    @Before
    public void setup(){
        jedis = JedisConnectionFactory.getjedis();
        //jedis.auth("ys199639");
        //jedis.select(0);
    }

    @Test
    public void teststring(){
        String set = jedis.set("home", "changchun");
        System.out.println(set);

        String home = jedis.get("home");
        System.out.println(home);

        System.out.println(jedis);
    }

    @After
    public void close(){
        if (jedis!= null){
            jedis.close();
        }
    }
}
